<include file="header"/>
<body class="bg-grey">
<div class="wraper margin-b">
    <div class="user-info">
        <div class="user-img">
            <if condition="$huserPersonalInfo.image_url"><img src="{BEESCRM:$huserPersonalInfo.image_url}" id='image'/>
                <else/><img src="/assets/park/huser/images/default.jpg" id='image'/>
            </if>
            <p class="camera"><span class="iconfont icon-xiangji"></span></p>
            <input type="file" class="upload-btn" id="fileupload_input"/>
        </div>
        <p class="user-name">{BEESCRM:$huserPersonalInfo.real_name}</p>
    </div>
    <if condition="$huserPersonalInfo.sex eq 1"><div class="lists block-top">男</div>
        <elseif condition="$huserPersonalInfo.sex eq 2"/><div class="lists block-top">女</div>
    </if>
    <div class="lists" style="border-top: none">{BEESCRM:$huserPersonalInfo.tel}</div>
    <div class="lists" style="border-top: none">{BEESCRM:$huserPersonalInfo.user_age}岁</div>
    <if condition="$huserPersonalInfo.type eq 1"><div class="lists" style="border-top: none">全职陪护</div>
        <elseif condition="$huserPersonalInfo.type eq 2"/><div class="lists" style="border-top: none">兼职陪护</div>
    </if>
    <div class="lists" style="border-top: none">{BEESCRM:$huserPersonalInfo.start_time|date="Y-m-d",###}至{BEESCRM:$huserPersonalInfo.end_time|date="Y-m-d",###}</div>
    <div class="lists" style="border-top: none">{BEESCRM:$huserPersonalInfo.identity_num}</div>
    <div class="fixed-btn-box">
        <a href="/Park/hkeeper/myreservationlist/conf_id/1" name="myUser">我的陪护</a>
        <a href="/Park/hkeeper/personalcenter/conf_id/1" name="myUser" class="visited">个人中心</a>
    </div>
</div>
<div class="pop-box" id="">
    <div class="main">
        <p class="iconfont icon-chenggong"></p>
        <div class="main-text">
            <p class="stress text-center">信息已提交</p>
            <p class="text-center">请耐心等待审核</p>
        </div>
    </div>
</div>
<div class="pop-box" id="pop-box">
    <div class="main">
        <p class="iconfont icon-chenggong"></p>
        <div class="main-text">
            <p class="text-center">数据异常</p>
        </div>
    </div>
</div>
<script src="/assets/park/huser/js/jquery-2.1.0.min.js"></script>
<script src="/assets/park/huser/js/date.js"></script>
<script src="/assets/park/huser/js/iscroll.js"></script>
<script type="text/javascript" src="/assets/bower_components/upload/jquery.ui.widget.js"></script>
<script type="text/javascript" src="/assets/bower_components/upload/jquery.fileupload.js"></script>
<script type="text/javascript" src="/assets/bower_components/upload/jquery.iframe-transport.js"></script>

<script>
    $('#beginTime').date();
    $('#endTime').date();

    $("a[name=myUser]").on('click',function(){
        $("a[name=myUser]").removeClass("visited");
        $(this).addClass("visited");
    });

    //图片上传
    $("#fileupload_input").fileupload({
        url: "/Park/hkeeper/getUploads/conf_id/1",//文件上传地址，当然也可以直接写在input的data-url属性内
        formData: {param1: "p1", param2: "p2"},//如果需要额外添加参数可以在这里添加
        done: function (e, result) {
            var data = $.parseJSON(result.result);
            console.log(data.message);
            if (data.code == 200) {
                $('#image').attr('src',data.url);
                $("#pop-box").show();
                $("#pop-box").find('.text-center').text(data.message);
                setTimeout(function(){$('#pop-box').hide()},2000);
            } else {
                alert('error'+data.message);
            }
        }
    });

</script>
</body>
</html>
